import junit.framework.TestCase;

public class TestMainPlayerController extends TestCase 
{
	public void testgetQuantityOfItem()
	{
		MainPlayerModel mpm = new MainPlayerModel();
		MainPlayerView mpv = new MainPlayerView(mpm);
		MainPlayerController mpc = new MainPlayerController(mpv, mpm);
		
		double cash = 0;
		double expectedResults = 0;
		
		expectedResults += cash;
		mpc.addCash(cash);
		assertEquals(expectedResults, mpc.getCash());
		
		cash += 5.3;
		expectedResults += cash;
		mpc.addCash(cash);
		assertEquals(expectedResults, mpc.getCash());
		
		cash -= 17.3;
		expectedResults += cash;
		mpc.addCash(cash);
		assertEquals(expectedResults, mpc.getCash());
		
		cash += 125.732;
		expectedResults += cash;
		mpc.addCash(cash);
		assertEquals(expectedResults, mpc.getCash());
	}
}